<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script type="text/javascript">
    function page(n, s) {
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchOrdersDisp").submit();
        return false;
    }
    $(function () {
        $("#btnCancel").on('click', function () {

        })
    })
</script>
<div class="app">
    <section class="layout">
        <section class="main-content">
            <div class="content-wrap">
                <div class="wrapper">
                    <ul class="nav nav-tabs">
                        <li>
                            <a href="#">已摆药查询列表</a>
                        </li>
                    </ul>
                    <section class="panel panel-default">
                        <div class="panel-body">
                            <div class="table-responsive no-border">
                                <div class="datatable-top">
                                    <div class="pull-left">
                                        <form:form id="searchOrdersDisp" modelAttribute="drugDispRec"
                                                   onsubmit="return loadDivForm('mainCenterDiv','searchOrdersDisp','${ctx}/orders/orders/queryDisped');"
                                                   method="post" class="form-inline">
                                            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                            <input id="pageSize" name="pageSize" type="hidden"
                                                   value="${page.pageSize}"/>
                                            <sys:treeselect selectedParent="true"   isnull="true" id="drugDispRec" name="wardCode"
                                                            value="${drugDispRec.wardCode}" update="false"
                                                            labelName="${drugDispRec.wardCode}"
                                                            labelValue="${drugDispRec.deptName}"
                                                            title="科室" url="/sys/orgDept/treeData"
                                                            cssClass="form-control"/>
                                            <form:input path="name" class="form-control" value="${drugDispRec.name}" placeholder="请输入患者姓名"/>
                                            <input name="startTime" value="${drugDispRec.startTime}"
                                                   class="form-control Wdate" type="text"
                                                   onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
                                                   readonly="readonly"/>
                                            <label>至</label>
                                            <input name="endTime" value="${drugDispRec.endTime}"
                                                   class="form-control Wdate" type="text"
                                                   readonly="readonly"
                                                   onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>

                                            <input type="number" min="1" class="form-control input-sm spinner-input"
                                                   name="dispNo" placeholder="请输入摆药序号" value="${orders.dispNo}">
                                            <input class="btn btn-primary" type="submit" value="查询"/>
                                        </form:form>
                                    </div>
                                </div>
                                <table id="ordersDispTable" class="table table-bordered mg-t datatable">
                                    <thead>
                                    <tr>
                                        <th>摆药序号</th>
                                        <th>姓名</th>
                                        <th>医嘱内容</th>
                                        <th>药品规格</th>
                                        <th>药品单位</th>
                                        <th>药品厂商</th>
                                        <th>数量</th>
                                        <th>费用</th>
                                        <th>摆药时间</th>
                                        <th>摆药人</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${page.list}" var="rec">
                                        <tr style="text-align: center;">
                                            <th> ${rec.remarks}</th>
                                            <td> ${rec.name}</td>
                                            <td> ${rec.orderText}</td>
                                            <td> ${rec.drugSpec}</td>
                                            <td> ${fns:getDictLabel(rec.drugUnits, 'SPEC_UNIT', '')}</td>
                                            <td> ${rec.firmName}</td>
                                            <td> ${rec.amount} </td>
                                            <td> ${rec.costs}</td>
                                            <td><fmt:formatDate value="${rec.createDate}"
                                                                pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                            <td>${fns:getUserName(rec.createBy)}</td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                                <div class="pagination">${page}</div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
    </section>
</div>



